//{{AFX_INCLUDES()
#include "vsflexgrid.h"
//}}AFX_INCLUDES
#if !defined(AFX_DLGPROJCALCSETTIESET_H__05C3B853_D2E5_482C_A44F_EA867D654863__INCLUDED_)
#define AFX_DLGPROJCALCSETTIESET_H__05C3B853_D2E5_482C_A44F_EA867D654863__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgProjCalcSetTieMode.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDlgProjSettingsTieMode dialog
class CDlgProjSettingsTieMode : public CDialog
{
private:
	CWzdToolTipCtrl m_tip ;
	int     m_nLevelStartRow[STL_LEVEL_Count];
	int		GetMaxRangeID();
	void	InitCancelInfo(CANCEL_INFO* pNode,int nOpType,LPCTSTR szHint,char* szOldItem=NULL,char* szNewItem=NULL);
	void	ReLoad(int nModifyRangeRowCount,int nModifyValueCount,CANCEL_INFO* pNode);
	BOOL	CountModifyRecord(CString strDbFile,int& nModifyRangeRowCount,int& nModifyValueCount);
public:
	CString m_strOldVal;
	BOOL    m_bHasData;
	BOOL	m_bCancelSel;
	bool    m_bRowEditable[200] ;
	void	InitList();
	void	Cancel(CANCEL_INFO* pNode);
	void	Redo(CANCEL_INFO* pNode);
	void	ShowRecord(int nSelRow=0);
	BOOL	ReadProjSettings();
 	BOOL	Read();
	void	Clear();
public:
	CDlgProjSettingsTieMode(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CDlgProjSettingsTieMode)
	enum { IDD = IDD_Dlg_Proj_Settings_TieMode};
	CVSFlexGrid	m_Vs;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgProjSettingsTieMode)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CDlgProjSettingsTieMode)
	afx_msg void OnClickVs();
	afx_msg void OnBeforeSelChangeVs(long OldRowSel, long OldColSel, long NewRowSel, long NewColSel, BOOL FAR* Cancel);
	afx_msg void BeforeEditVs(long Row, long Col, BOOL FAR* Cancel);
	afx_msg void OnCellChangedVs(long Row, long Col);
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButtonResume();
	afx_msg void OnBnClickedButtonImport();
	afx_msg void OnBnClickedButtonExport();
	void ComboCloseUpVs(long Row, long Col, BOOL* FinishEdit);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGPROJCALCSETTIESET_H__05C3B853_D2E5_482C_A44F_EA867D654863__INCLUDED_)
